3.292 \(\int \frac {a+b \sin (c+\frac {d}{x})}{(e+f x)^2} \, dx\)

Optimal. Leaf size=94 \[ \frac {a}{e \left (\frac {e}{x}+f\right )}-\frac {b d \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e \left (\frac {e}{x}+f\right )} \]

[Out]

a/e/(f+e/x)-b*d*Ci(d*(f/e+1/x))*cos(c-d*f/e)/e^2+b*d*Si(d*(f/e+1/x))*sin(c-d*f/e)/e^2+b*sin(c+d/x)/e/(f+e/x)

________________________________________________________________________________________

Rubi [A]  time = 0.22, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3431, 3317, 3297, 3303, 3299, 3302} \[ \frac {a}{e \left (\frac {e}{x}+f\right )}-\frac {b d \cos \left (c-\frac {d f}{e}\right ) \text {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e \left (\frac {e}{x}+f\right )} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[c + d/x])/(e + f*x)^2,x]

[Out]

a/(e*(f + e/x)) - (b*d*Cos[c - (d*f)/e]*CosIntegral[d*(f/e + x^(-1))])/e^2 + (b*Sin[c + d/x])/(e*(f + e/x)) +
(b*d*Sin[c - (d*f)/e]*SinIntegral[d*(f/e + x^(-1))])/e^2

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3317

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rule 3431

Int[((g_.) + (h_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)])^(p_.), x_Symbol] :
> Dist[1/(n*f), Subst[Int[ExpandIntegrand[(a + b*Sin[c + d*x])^p, x^(1/n - 1)*(g - (e*h)/f + (h*x^(1/n))/f)^m,
 x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p, 0] && IntegerQ[1/n]

Rubi steps

\begin {align*} \int \frac {a+b \sin \left (c+\frac {d}{x}\right )}{(e+f x)^2} \, dx &=-\operatorname {Subst}\left (\int \frac {a+b \sin (c+d x)}{(f+e x)^2} \, dx,x,\frac {1}{x}\right )\\ &=-\operatorname {Subst}\left (\int \left (\frac {a}{(f+e x)^2}+\frac {b \sin (c+d x)}{(f+e x)^2}\right ) \, dx,x,\frac {1}{x}\right )\\ &=\frac {a}{e \left (f+\frac {e}{x}\right )}-b \operatorname {Subst}\left (\int \frac {\sin (c+d x)}{(f+e x)^2} \, dx,x,\frac {1}{x}\right )\\ &=\frac {a}{e \left (f+\frac {e}{x}\right )}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}-\frac {(b d) \operatorname {Subst}\left (\int \frac {\cos (c+d x)}{f+e x} \, dx,x,\frac {1}{x}\right )}{e}\\ &=\frac {a}{e \left (f+\frac {e}{x}\right )}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}-\frac {\left (b d \cos \left (c-\frac {d f}{e}\right )\right ) \operatorname {Subst}\left (\int \frac {\cos \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{e}+\frac {\left (b d \sin \left (c-\frac {d f}{e}\right )\right ) \operatorname {Subst}\left (\int \frac {\sin \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{e}\\ &=\frac {a}{e \left (f+\frac {e}{x}\right )}-\frac {b d \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^2}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}+\frac {b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.74, size = 85, normalized size = 0.90 \[ \frac {\frac {e \left (b f x \sin \left (c+\frac {d}{x}\right )-a e\right )}{f (e+f x)}-b d \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sin[c + d/x])/(e + f*x)^2,x]

[Out]

(-(b*d*Cos[c - (d*f)/e]*CosIntegral[d*(f/e + x^(-1))]) + (e*(-(a*e) + b*f*x*Sin[c + d/x]))/(f*(e + f*x)) + b*d
*Sin[c - (d*f)/e]*SinIntegral[d*(f/e + x^(-1))])/e^2

________________________________________________________________________________________

fricas [A]  time = 0.71, size = 164, normalized size = 1.74 \[ \frac {2 \, b e f x \sin \left (\frac {c x + d}{x}\right ) - 2 \, a e^{2} - 2 \, {\left (b d f^{2} x + b d e f\right )} \sin \left (-\frac {c e - d f}{e}\right ) \operatorname {Si}\left (\frac {d f x + d e}{e x}\right ) - {\left ({\left (b d f^{2} x + b d e f\right )} \operatorname {Ci}\left (\frac {d f x + d e}{e x}\right ) + {\left (b d f^{2} x + b d e f\right )} \operatorname {Ci}\left (-\frac {d f x + d e}{e x}\right )\right )} \cos \left (-\frac {c e - d f}{e}\right )}{2 \, {\left (e^{2} f^{2} x + e^{3} f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e)^2,x, algorithm="fricas")

[Out]

1/2*(2*b*e*f*x*sin((c*x + d)/x) - 2*a*e^2 - 2*(b*d*f^2*x + b*d*e*f)*sin(-(c*e - d*f)/e)*sin_integral((d*f*x +
d*e)/(e*x)) - ((b*d*f^2*x + b*d*e*f)*cos_integral((d*f*x + d*e)/(e*x)) + (b*d*f^2*x + b*d*e*f)*cos_integral(-(
d*f*x + d*e)/(e*x)))*cos(-(c*e - d*f)/e))/(e^2*f^2*x + e^3*f)

________________________________________________________________________________________

giac [B]  time = 0.58, size = 347, normalized size = 3.69 \[ -\frac {b d^{3} f \cos \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Ci}\left ({\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) - b c d^{2} \cos \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Ci}\left ({\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) e + b d^{3} f \sin \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Si}\left (-{\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) - b c d^{2} e \sin \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Si}\left (-{\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) + \frac {{\left (c x + d\right )} b d^{2} \cos \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Ci}\left ({\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) e}{x} + \frac {{\left (c x + d\right )} b d^{2} e \sin \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Si}\left (-{\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right )}{x} - b d^{2} e \sin \left (\frac {c x + d}{x}\right ) - a d^{2} e}{{\left (d f e^{2} - c e^{3} + \frac {{\left (c x + d\right )} e^{3}}{x}\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e)^2,x, algorithm="giac")

[Out]

-(b*d^3*f*cos(-(d*f - c*e)*e^(-1))*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1)) - b*c*d^2*cos(-(d*f - c*e)
*e^(-1))*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e + b*d^3*f*sin(-(d*f - c*e)*e^(-1))*sin_integral(-(
d*f - c*e + (c*x + d)*e/x)*e^(-1)) - b*c*d^2*e*sin(-(d*f - c*e)*e^(-1))*sin_integral(-(d*f - c*e + (c*x + d)*e
/x)*e^(-1)) + (c*x + d)*b*d^2*cos(-(d*f - c*e)*e^(-1))*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e/x +
(c*x + d)*b*d^2*e*sin(-(d*f - c*e)*e^(-1))*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1))/x - b*d^2*e*sin((
c*x + d)/x) - a*d^2*e)/((d*f*e^2 - c*e^3 + (c*x + d)*e^3/x)*d)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 144, normalized size = 1.53 \[ -d \left (-\frac {a}{\left (e \left (c +\frac {d}{x}\right )-c e +d f \right ) e}+b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{\left (e \left (c +\frac {d}{x}\right )-c e +d f \right ) e}+\frac {\frac {\Si \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}+\frac {\Ci \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}}{e}\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(c+d/x))/(f*x+e)^2,x)

[Out]

-d*(-a/(e*(c+d/x)-c*e+d*f)/e+b*(-sin(c+d/x)/(e*(c+d/x)-c*e+d*f)/e+(Si(d/x+c+(-c*e+d*f)/e)*sin((-c*e+d*f)/e)/e+
Ci(d/x+c+(-c*e+d*f)/e)*cos((-c*e+d*f)/e)/e)/e))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ b {\left (\int \frac {\sin \left (\frac {c x + d}{x}\right )}{2 \, {\left (f^{2} x^{2} + 2 \, e f x + e^{2}\right )}}\,{d x} + \int \frac {\sin \left (\frac {c x + d}{x}\right )}{2 \, {\left ({\left (f^{2} x^{2} + 2 \, e f x + e^{2}\right )} \cos \left (\frac {c x + d}{x}\right )^{2} + {\left (f^{2} x^{2} + 2 \, e f x + e^{2}\right )} \sin \left (\frac {c x + d}{x}\right )^{2}\right )}}\,{d x}\right )} - \frac {a}{f^{2} x + e f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e)^2,x, algorithm="maxima")

[Out]

b*(integrate(1/2*sin((c*x + d)/x)/(f^2*x^2 + 2*e*f*x + e^2), x) + integrate(1/2*sin((c*x + d)/x)/((f^2*x^2 + 2
*e*f*x + e^2)*cos((c*x + d)/x)^2 + (f^2*x^2 + 2*e*f*x + e^2)*sin((c*x + d)/x)^2), x)) - a/(f^2*x + e*f)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {a+b\,\sin \left (c+\frac {d}{x}\right )}{{\left (e+f\,x\right )}^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(c + d/x))/(e + f*x)^2,x)

[Out]

int((a + b*sin(c + d/x))/(e + f*x)^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {a + b \sin {\left (c + \frac {d}{x} \right )}}{\left (e + f x\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e)**2,x)

[Out]

Integral((a + b*sin(c + d/x))/(e + f*x)**2, x)

________________________________________________________________________________________